package cn.wolfcode.crm.service.impl;

import cn.wolfcode.crm.domain.Types;
import cn.wolfcode.crm.mapper.TypesMapper;
import cn.wolfcode.crm.service.ITypesService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypesServiceImpl implements ITypesService{

    private TypesMapper mapper;
    public void save(Types types) {
        mapper.insert(types);
    }

    public void delete(Long id) {
        mapper.deleteByPrimaryKey(id);
    }

    public void update(Types types) {
        mapper.updateByPrimaryKey(types);
    }

    public Types get(Long id) {
        Types types = mapper.selectByPrimaryKey(id);
        return types;
    }

    public List<Types> getAll() {
        List<Types> list = mapper.selectAll();
        return list;
    }
}
